//
//  Section3TableViewCell.m
//  ACMediaFrameExample
//
//  Created by 付顺龙 on 2019/3/11.
//  Copyright © 2019 ArthurCao. All rights reserved.
//

#import "Section3TableViewCell.h"

@interface Section3TableViewCell()<UITextViewDelegate>

@end

@implementation Section3TableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code'
    self.textView.layer.borderWidth = 0.5;
    self.textView.layer.borderColor = [UIColor colorWithRed:251/255.0 green:251/255.0 blue:251/255.0 alpha:1].CGColor;
    self.myImageView.userInteractionEnabled = YES;
    self.textView.delegate = self;
    self.textView.layer.borderColor = rgb(221,221,221).CGColor;
    self.textView.layer.borderWidth = 0.5;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(addImage)];
    [self.myImageView addGestureRecognizer:tap];
    self.cleanBtn.hidden = YES;
    self.progressView.hidden = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)addImage {
//    self.cleanBtn.hidden = NO;
    if ([_delegate respondsToSelector:@selector(addtionImage:)]) {
        [_delegate addtionImage:self];
    }
}
- (IBAction)delImage:(id)sender {
//    self.cleanBtn.hidden = YES;
    self.cleanBtn.hidden = YES;
    self.progressView.hidden = YES;
    if ([_delegate respondsToSelector:@selector(deleteImage:)]) {
        [_delegate deleteImage:self];
    }
}
- (IBAction)addCell:(id)sender {
    if ([_delegate respondsToSelector:@selector(addtionCell:)]) {
        [_delegate addtionCell:self];
    }
}
- (IBAction)delCell:(id)sender {
    if ([_delegate respondsToSelector:@selector(deleteCell:)]) {
        [_delegate deleteCell:self];
    }
}
-(void)textViewDidChange:(UITextView *)textView {
    if ([_delegate respondsToSelector:@selector(changeInfo:)]) {
        [_delegate changeInfo:self];
    }
}

@end
